package cn.yunhe.services.impl;

import cn.yunhe.dao.IStudentCollDao;
import cn.yunhe.entity.Coll;
import cn.yunhe.services.IStudentCollService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 学生收藏 service 实现类
 */
@Service
public class StudentCollServiceImpl implements IStudentCollService {

    @Resource
    private IStudentCollDao studentCollDao;


    /**
     * 收藏 题目 实现类1
     * @param map
     */
    @Override
    public void insertPro(Map map) {
        studentCollDao.insertPro(map);
    }



    /**
     * 判断是否 收藏过该题目
     * @param map
     */
    @Override
    public Boolean judgeColl(Map map) {
        Coll coll = studentCollDao.selectRepetProblem(map);
        if (coll == null){
            return false;
        }else {
            return true;
        }
    }

}
